package com.itheima.shop.controller;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TableTest {
	@Autowired
	private HttpServletRequest request;
	
	@RequestMapping("/test")
	public String test() {
		List<Integer> arrs = new ArrayList<>();
		for(int i=0;i<10;i++) {
			arrs.add(i);
		}
		request.setAttribute("arrs",arrs);
		System.out.println(arrs);
		return "forward:test.jsp";
	}
}
